# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=py3-pylint
pkgver=3.1.0
pkgrel=2
pkgdesc="Analyzes Python code looking for bugs and signs of poor quality"
url="https://github.com/PyCQA/pylint"
arch="noarch"
license="GPL-2.0-or-later"
depends="
	py3-astroid
	py3-dill
	py3-isort
	py3-mccabe
	py3-platformdirs
	py3-tomlkit
	"
makedepends="
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-gitpython
	py3-py
	py3-pytest7
	py3-pytest-benchmark
	py3-pytest-cov
	py3-pytest-runner
	py3-pytest-timeout
	py3-pytest-xdist
	py3-requests
	py3-typing-extensions
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/PyCQA/pylint/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir"/pylint-$pkgver

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest --benchmark-disable --deselect tests/test_functional.py::test_functional tests 
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/pylint-*.whl
}

sha512sums="
bb7f09fa8b2c6f218c0e4d74ec2d7bbcb5e9d9fa8c2aeae5a1bf899f25080251609f284959fab14dd93cc5dd911688e25d3d4e1e030a1790578bc78ef1ce2bf7  py3-pylint-3.1.0.tar.gz
"
